/*
 * @Author: your name
 * @Date: 2024-04-06 15:47:32
 * @LastEditTime: 2024-04-06 15:53:51
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \.leetcode\344.反转字符串.cpp
 */
/*
 * @lc app=leetcode.cn id=344 lang=cpp
 *
 * [344] 反转字符串
 */

// @lc code=start
class Solution {
public:
    void reverseString(vector<char>& s) {
        int left =0, right = s.size()-1;
        while(left < right){
            char tmp = s[left];
            s[left] = s[right];
            s[right] = tmp;
            right--;
            left++;
        }
    }
};
// @lc code=end
// 直接双指针
